#include "win_audio.h"
#include <stdlib.h>
#include "DsoundRecorder.h"
RecordHandler ds_start_record(REC_DATA_CB cb,REC_END_CB end_cb){
    Recorder* recorder = new Recorder();
    recorder->data_callback = cb;
    recorder->end_callback = end_cb;
    if(startRecorder(recorder)){
        delete recorder;
        return NULL;
    }

    return recorder;
}
void ds_stop_record(RecordHandler h){
    if(!h){
        return ;
    }
    Recorder* recorder = (Recorder*)h;
    stopRecorder(recorder);
    delete recorder;
}
